package com.foreknow.demo4;

import sun.plugin.services.WPlatformService;

public class PersonImpl extends Person {
    @Override
    public void eat() {
        System.out.println("eat......");
    }

    @Override
    public void sleep() {
        System.out.println("sleep......");
    }

    @Override
    public void study() {
        System.out.println("study......");
    }

    public static void main(String[] args) {
        //父类的引用指向子类的对象
        //注意： 抽象类不能被实例化(不能new)
        Person person = new PersonImpl();
        person.eat();
        person.sleep();
        person.study();
    }
}
